import {
  createRouter,
  createWebHashHistory,
  RouteRecordRaw
} from 'vue-router'
import Home from '@/views/homePage.vue'
import Login from '@/views/loginPage.vue'

const routes: RouteRecordRaw[] = [
  // {
  //   path: '/',
  //   name: 'Home',
  //   component: Home
  // },
  {
    path: '/',
    redirect: '/InterfaceList',
  },
  {
    path: '/InterfaceList',
    name: 'InterfaceList',
    component: () => import('@/views/InterfaceList.vue') // 接口列表
  },
  {
    path: '/AccountList',
    name: 'AccountList',
    component: () => import('@/views/AccountList.vue') // 账号列表
  },
  {
    path: '/AccountAssociationInterface',
    name: 'AccountAssociationInterface',
    component: () => import('@/views/AccountAssociationInterface.vue') // 账号关联接口
  },
  {
    path: '/verticalAuthentication',
    name: 'verticalAuthentication',
    component: () => import('@/views/verticalAuthentication.vue') // 垂直鉴权
  },
  {
    path: '/HorizontalAuthentication',
    name: 'HorizontalAuthentication',
    component: () => import('@/views/HorizontalAuthentication.vue') // 水平鉴权
  },



  {
    path: '/Login',
    name: 'Login',
    component: Login
  },
  {
    path: '/UserManage',
    name: 'UserManage',
    component: () => import('@/views/UserManage/UserManage.vue') // 用户管理
  },
  {
    path: '/areaGrid',
    name: 'areaGrid',
    component: () => import('@/views/areaGrid.vue') // 用户管理
  },
]

const router = createRouter({
  history: createWebHashHistory(),
  routes
})

export default router
